home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / disk-man / linux-fl.000 / linux-fl / linux-floppies / umountb < prev    next >
Encoding:
Text File  |  1996-04-05  |  974 b   |  46 lines

  1. #!/bin/sh
  2.  
  3. # ---------------------------------------------------
  4. # Script for unmounting diskettes 
  5. # ---------------------------------------------------
  6.  
  7. # ---- EDIT TO SUIT YOUR NEEDS -------
  8. # Put it in your path (/usr/local/lib).
  9.  
  10. # Directory under which the diskette is mounted
  11. #DIRECTORY=/a
  12. DIRECTORY=/b
  13.  
  14. COLOR1="\033[37;44m"           # normal white  on blue 
  15. COLOR2="\033[1;6m\033[37;44m" # bright white  on blue 
  16. COLOR3="\033[1;6m\033[36;44m" # bright cyan on blue 
  17. COLOR4="\033[0m\033[34;47m"   # blue on normal white 
  18. COLOR5="\033[1;6m\033[31;40m" # bright red on black 
  19. COLOR6="\033[1;6m\033[37;41m" # bright white on red 
  20. COLOR_RESET="\033[0m" 
  21.  
  22. # ===== YOU CANNOT UMOUNT /b WHILE YOU ARE IN IT ======
  23.  
  24. if `umount /b  2> /tmp/error.temp` 
  25.    then
  26.      echo -e $COLOR2 "  OK  " $COLOR4  $DIRECTORY is unmounted \
  27.     $COLOR_RESET 
  28.    else
  29.     echo -e $COLOR6 " ERROR " $COLOR5 `cat /tmp/error.temp` \
  30.     $COLOR_RESET
  31.     exit
  32. fi
  33.  
  34. rm -f /tmp/error.tmp 2> /dev/null
  35.  
  36.  
  37.   
  38.  
  39.  
  40.  
  41.   
  42.  
  43.  
  44.  
  45.  
  46.